<template>
	<view class="uni_box home">
		<navbar title='分享好友'>
		</navbar>
		<view class="content">
			<view class="sone">
				<image class="sharebg" mode="widthFix" src="/static/img/sharebg.png"></image>
				<view class="maview">
					<uv-qrcode ref="qrcode" size="80px" v-if="share_url" :value="share_url"></uv-qrcode>
				</view>
			</view>
			<view class="yao">
				<text class="yaoming">邀请说明</text>
				<text class="miao">1.好友通过您分享的邀请海报注册登录后，Ta将与您保持链接关系；</text>
				<text class="miao">2.未来Ta产生的订单您都将获得佣金奖励，奖励会自动计入您的账号中！！</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				share_url:'',
				info:{}
			}
		},
		onLoad() {
			this.getuserinfo();
		},
		onShow() {
		},
		methods: {
			async getuserinfo(){
				let res = await this.$u.api.userinfo({
				});
				this.info = res
				this.share_url = res.share_url
			},
		}
	}
</script>

<style lang="scss" scoped>
	page{
		background-color: #fff;
	}
	.content{
		background-color: #fff;
		min-height: 100vh;
		padding: 30rpx;
		.sone{
			padding: 0 40rpx;
			position: relative;
		}
		.sharebg{
			width: 100%;
		}
		.maview{
			position: absolute;
			width: 160rpx;
			height: 160rpx;
			background-color: #fff;
			border-radius: 10rpx;
			right: 100rpx;
			bottom: 50rpx;
		}
		.yao{
			margin: 30rpx 0;
			.yaoming{
				display: block;
				text-align: center;
				font-family: PingFang SC;
				font-weight: bold;
				font-size: 36rpx;
				color: #171F48;
				margin-bottom: 40rpx;
			}
			.miao{
				font-family: PingFang SC;
				font-weight: 400;
				font-size: 28rpx;
				color: #666666;
				display: block;
				margin-bottom: 10rpx;
			}
		}
	}
</style>
